package com.fbty.mt.dwr;

import java.util.Map;

import com.fbty.base.domain.Page;
import com.fbty.base.dwr.DwrAuthHelper;
import com.fbty.mt.domain.User;
import com.fbty.mt.service.UserService;

public class UserDwr {
	private UserService userService;
	/**
	 * 分页查询出所有的用户
	 */
	public Page pageUser(Integer pageNo,Map<String, String> parms) {
		User user = DwrAuthHelper.getUser();
		return userService.pageUser(pageNo, Page.PRODUCT_PAGE_SIZE,parms);
	}
	/**
	 * 批量删除选择的用户
	 */
	public void deleteUser(String ids) {
		User user = DwrAuthHelper.getUser();
		String[] arr = ids.split(":");
		for(String id : arr) {
			userService.deleteUser(Integer.parseInt(id));
		}
	}
	/**
	 * 改更用户角色
	 */
	public void updateTitle(Integer uid,Integer rid) {
		User user = DwrAuthHelper.getUser();
		Object[] params = {uid,rid};
		//userService.updateTitle(params);
	}
	public UserService getUserService() {
		return userService;
	}

	public void setUserService(UserService userService) {
		this.userService = userService;
	}
}
